import request from '@/utils/request'

export const addCustomer = (data) => {
  return request({
    url: '/v1/departmentWork/customer/',
    method: 'post',
    data
  })
}

export const getCustomer = (params) => {
  return request({
    url: '/v1/departmentWork/customer/',
    method: 'get',
    params
  })
}

// 添加提成记录
export const addCommission = (data) => {
  return request({
    url: '/v1/departmentWork/customer/comm/',
    method: 'post',
    data
  })
}

// 查询提成记录
export const getCommission = (params) => {
  return request({
    url: '/v1/departmentWork/customer/comm/',
    method: 'get',
    params
  })
}

// 查询用户自己的提成
export const getMyCommission = (params) => {
  return request({
    url: '/v1/departmentWork/customer/comm/my/',
    method: 'get',
    params
  })
}

// 查询权益记录
export const getRights = (params) => {
  return request({
    url: '/v1/departmentWork/customer/ri/',
    method: 'get',
    params
  })
}
// 查询自己的权益记录
export const getMyRights = (params) => {
  return request({
    url: '/v1/departmentWork/customer/ri/my/',
    method: 'get',
    params
  })
}

// 查询权益统计
export const getRightsStatistics = (params) => {
  return request({
    url: '/v1/departmentWork/customer/ri/statistics/',
    method: 'get',
    params
  })
}
